#!/bin/sh

source activate pytorch

while true
do
    res=`ps -ef | grep semi_test_mixmatch.sh | grep -v grep | wc -l`
    if [ $res -eq  0 ]
    then
        echo "semi_test_mixmatch.sh 执行完毕"
        break
    else
        echo "semi_test_mixmatch.sh 执行中, sleep 300"
        sleep 300
    fi
done


datasets='cub'
shots='2 1'
unlabels='0 30'
msi='5'

for dataset in $datasets
do
    for shot in $shots
    do
        for unlabel in $unlabels
        do
            # ((msi=$shot * 3))
            echo "python eval_semi_logits_no_reinit_two_phase_ep.py -gpu 0 -shot $shot -test_episode 600 -dataset $dataset --with_SA --SA_res --no_mlp --SA_dropout 0.5 --pos_embed --model_name resnet_MyResSA --sche CosineLR --unlabel $unlabel --show_detail -sfc_lr 100 --msi $msi --semi_step $shot"
            python eval_semi_logits_no_reinit_two_phase_ep.py -gpu 0 -shot $shot -test_episode 600 -dataset $dataset --with_SA --SA_res --no_mlp --SA_dropout 0.5 --pos_embed --model_name resnet_MyResSA --sche CosineLR --unlabel $unlabel --show_detail -sfc_lr 100 --msi $msi --semi_step $shot
        done
    done
done